home *** CD-ROM | disk | FTP | other *** search
- using System;
- using System.Collections;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.IO;
- using System.Web;
- using System.Web.Security;
- using System.Web.SessionState;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Web.UI.HtmlControls;
-
- namespace gbweb
- {
- /// <summary>
- /// Summary description for Logout.
- /// </summary>
- public partial class Logout2 : System.Web.UI.Page
- {
- protected void Page_Load(object sender, System.EventArgs e)
- {
- //Set the header tab of the Guide to active
- NAV_LOGOUT.Attributes.Add("class", "currentTab");
-
- Session["GuideStartTime"] = null;
- //Code to prevent Guest users from accessing the Admin and search Pages
- if (!Convert.ToBoolean((string)Session["NotGuestUser"]))
- {
- NAV_SEARCH.Visible = false;
- NAV_CONFIG.Visible = false;
- }
- getTheme();
- FormsAuthentication.SignOut();
- }
-
- private void getTheme()
- {
- //Check to see if the theme has been set in session and that the set theme is using the css view
- string theme = Convert.ToString(Session["theme"]);
-
- if (theme != null && theme != "" && theme.Substring(0, 7) == "themes2")
- {
- return;
- }
- else
- {
- //Since the session theme variable was not set or is using the table view we need to read the value from the cookie
- HttpCookie cookie = Request.Cookies["theme"];
- if (cookie != null && cookie.Value.Length > 0)
- {
- theme = cookie.Value;
- }
- else
- {
- theme = "Default";
- }
-
- //Verify that that the theme in the cookie is available in the CSS based selections. If it is not found set the theme to Default.
- if (File.Exists(HttpContext.Current.Server.MapPath("~/themes2/") + theme + "/styles.css"))
- {
- Session["theme"] = "themes2/" + theme;
- }
- else
- {
- Session["theme"] = "themes2/Default";
- }
-
- return;
- }
- }
-
- #region Web Form Designer generated code
- override protected void OnInit(EventArgs e)
- {
- //
- // CODEGEN: This call is required by the ASP.NET Web Form Designer.
- //
- InitializeComponent();
- base.OnInit(e);
- }
-
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- private void InitializeComponent()
- {
- }
- #endregion
- }
- }
-